
def dict_handle(query_model, query_field, filter_data=None):
    if filter_data is None:
        filter_data = {}
    info = list(query_model.objects.filter(**filter_data).order_by(query_field).values(query_field).distinct().values_list(query_field, flat=True))
    data = []
    for item in info:
        data.append({"label": item, "value":item}) if item else None
    return data